package com.hxgz.steel.dao;

import com.hxgz.steel.domain.Quotation;
import com.hxgz.steel.dto.AppointAskBuyDto;
import com.hxgz.steel.dto.AskBuyDto;
import com.hxgz.steel.dto.QuotationInfoDto;
import java.util.HashMap;

import com.hxgz.steel.dto.QuotationTempDto;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.Set;

@Component("QuotationMapper")
public interface QuotationMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Quotation record);

    int insertSelective(Quotation record);

    Quotation selectByPrimaryKey(Long id);

    Quotation selectByAskBuyIdAndMerchantId(@Param("askBuyId") Long askBuyId, @Param("merchantId")Long merchantId);

    int updateByPrimaryKeySelective(Quotation record);

    int updateByPrimaryKey(Quotation record);

    List selectListByStatusAndUserId(Map map);

    QuotationInfoDto getQuotationInfo(@Param("id") Long id, @Param("userId")Long userId);

    Integer countNum(Integer askBuyId);

    Quotation getNewPrice(Integer integer);

    Integer countNumByNull(Integer integer);

    int updateStatusByAskIdAndMerchantId(@Param("id") Long id, @Param("merchantId")Long merchantId);

    int updateByAskIdAndMerchantId(@Param("id") Long id, @Param("price")BigDecimal price, @Param("merchantId")Long merchantId);

    List<Quotation> getAskBuyStore(@Param("askId") Long askId,@Param("pageSize")Integer pageSize);

    List<Quotation> getListByid(Long id);

    List<Quotation> selectMerchantIdByTopName(String topname);

    Set<Long> getMerchantIdByTopName(@Param("topname") String topname, @Param("myMerchantId") Long myMerchantId);

    List<AppointAskBuyDto> getappointAskBuyList(HashMap<Object, Object> map);

    List<AskBuyDto> getAskBuyList(HashMap<Object, Object> map);

    Quotation selectByMerchantId(Long merchantId);

    void deleteByAskId(@Param("askId") Long askId);

    List<Long> getAllQuotationId(@Param("askId") Long askId);

    List<QuotationTempDto> getQuotationTempDtoListByid(@Param("id") Long id);
}